package com.ruoyi.project.baozhi.baozhi.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.baozhi.baozhi.mapper.BaozhiMapper;
import com.ruoyi.project.baozhi.baozhi.domain.Baozhi;
import com.ruoyi.project.baozhi.baozhi.service.IBaozhiService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 报纸Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-12-06
 */
@Service
public class BaozhiServiceImpl implements IBaozhiService 
{
    @Autowired
    private BaozhiMapper baozhiMapper;

    /**
     * 查询报纸
     * 
     * @param id 报纸主键
     * @return 报纸
     */
    @Override
    public Baozhi selectBaozhiById(String id)
    {
        return baozhiMapper.selectBaozhiById(id);
    }

    /**
     * 查询报纸列表
     * 
     * @param baozhi 报纸
     * @return 报纸
     */
    @Override
    public List<Baozhi> selectBaozhiList(Baozhi baozhi)
    {
        return baozhiMapper.selectBaozhiList(baozhi);
    }

    @Override
    public List<Baozhi> selectBaozhiList1(Baozhi baozhi)
    {
        return baozhiMapper.selectBaozhiList1(baozhi);
    }

    /**
     * 新增报纸
     * 
     * @param baozhi 报纸
     * @return 结果
     */
    @Override
    public int insertBaozhi(Baozhi baozhi)
    {
        return baozhiMapper.insertBaozhi(baozhi);
    }

    /**
     * 修改报纸
     * 
     * @param baozhi 报纸
     * @return 结果
     */
    @Override
    public int updateBaozhi(Baozhi baozhi)
    {
        return baozhiMapper.updateBaozhi(baozhi);
    }

    @Override
    public int baozhishuliang(Baozhi baozhi)
    {
        return baozhiMapper.baozhishuliang(baozhi);
    }

    /**
     * 批量删除报纸
     * 
     * @param ids 需要删除的报纸主键
     * @return 结果
     */
    @Override
    public int deleteBaozhiByIds(String ids)
    {
        return baozhiMapper.deleteBaozhiByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除报纸信息
     * 
     * @param id 报纸主键
     * @return 结果
     */
    @Override
    public int deleteBaozhiById(String id)
    {
        return baozhiMapper.deleteBaozhiById(id);
    }
}
